BUTTON TEXT changes the text inside button to button text.
BUTTON TEXT affects only buttons that display text: plain buttons, check boxes, and radio buttons. The new button text is used only for the currently displayed layout. The text must be set each time the layout is displayed. The button area must be large enough to accommodate the text; if it is not, the text is truncated. Do not use carriage returns in button text.
This command refers only to the local use of the layout. Modifications made are not saved with the layout. In a process, they will effect all occurrences of the layout.
The following example is the script of a search button located in the footer area of an output layout which has been displayed using MODIFIED SELECTION. This script searches a file and enables or disables a button labeled Delete, depending on the results of the search:
SEARCH ([People]; [People]Name = vName) ` Find people to delete
Case of
: (Records in selection ([People]) = 0) ` No people found
BUTTON TEXT (bDelete; "Delete")
DISABLE BUTTON (bDelete)
`
: (Records in selection ([People]) = 1 ) ` One person found
BUTTON TEXT (bDelete; "Delete Person")
ENABLE BUTTON (bDelete)
`
: (Records in selection([People]), 1 ) ` Many people found